set -e

GCC_COMPILER=/home/sv/ken/rv1126-ai-box/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf

export CC=${GCC_COMPILER}-gcc
export CXX=${GCC_COMPILER}-g++

BUILD_DIR=output

if [[ -d "${BUILD_DIR}" ]]; then
rm -r ${BUILD_DIR}
fi

mkdir -p ${BUILD_DIR}

cd ${BUILD_DIR}
cmake ..
make -j4
make install
cd -

